package com.musicalevents.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

import com.musicalevents.entity.pk.ConcertPK;

@Entity
@Table(name="Concert")
@IdClass(ConcertPK.class)
public class Concert {
	
	@Id
	@Column(name="band")
	private Band band;
	@Id
	@Column(name="place")
	private Place place;
	
	@Column(name="date")
	private Date date;
	
	
	public Concert() {}
	
	public Concert(ConcertPK pk) {
		this.band = pk.getBand();
		this.place = pk.getPlace();
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Band getBand() {
		return band;
	}

	public void setBand(Band band) {
		this.band = band;
	}

	public Place getPlace() {
		return place;
	}

	public void setPlace(Place place) {
		this.place = place;
	}
}

